<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style type="text/css">
        .icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.15em;
            fill: currentColor;
            overflow: hidden;
        }
        .mui-col-sm-3{width: 24% !important;border: none !important}
        .mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-body{font-size: 12px !important;}
        .mui-slider .mui-slider-group .mui-slider-item img{height: 200px;}
    </style>
    <!--标准mui.css-->
    <link rel="stylesheet" href="__TMPL__/public/assets/wuye/css/mui.min.css">
    <!--App自定义的css-->
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/wuye/css/app.css"/>
    <link href="__TMPL__/public/assets/wuye/css/mui.picker.css" rel="stylesheet" />
    <link href="__TMPL__/public/assets/wuye/css/mui.poppicker.css" rel="stylesheet" />
</head>

<body>

<header class="mui-bar mui-bar-nav" id="header">
    <p class="mui-title" style="color: orangered">{$wxInfo.name}</p>
    <!--<a class="mui-icon  mui-pull-right" style="font-size: 16px;padding-top: 0px;color: orangered;" href="#picture">-->
        <!--<i class="mui-icon mui-icon-compose"></i>发布-->
    <!--</a>-->
</header>
<nav class="mui-bar mui-bar-tab">
    <a class="mui-tab-item mui-active" href="index.html">
        <span class="mui-icon mui-icon-home" id="home1"></span>
        <span class="mui-tab-label">首页</span>
    </a>
    <a class="mui-tab-item" href="service.html">
        <span class="mui-icon mui-icon-pengyouquan"></span>
        <span class="mui-tab-label">服务</span>
    </a>
    <a class="mui-tab-item" href="http://qiangcai.mingruisoft.com/app/index.php?i=2&c=entry&m=ewei_shopv2&do=mobile&r=quick&id=1
">
        <span class="mui-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-tiaozaoshichang01"></use></svg></span>
        <span class="mui-tab-label">快捷订菜</span>
    </a>
    <a class="mui-tab-item" href="me.html">
        <span class="mui-icon mui-icon-contact"></span>
        <span class="mui-tab-label">我的</span>
    </a>
</nav>
<div class="mui-content">
    <div id="home" class="mui-control-content mui-active">
        <div id="slider" class="mui-slider">
            <div class="mui-slider-group mui-slider-loop">
                <!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
                <volist name="carousel" id="volast" mod="count($volast)" >
                    <eq name="mod" value="count($volast)">
                    <div class="mui-slider-item mui-slider-item-duplicate">
                        <a href="{$volast.url|default=''}">
                            <img src="<?php echo cmf_get_image_url($volast['imgsrc']);?>">
                        </a>
                    </div>
                    </eq>
                </volist>
                <volist name="carousel" id="vo">
                    <div class="mui-slider-item">
                        <a href="{$vo.url|default=''}">
                            <img src="<?php echo cmf_get_image_url($vo['imgsrc']);?>">
                        </a>
                    </div>
                </volist>
                <!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
                <volist name="carousel" id="vofirst" mod="count($vofirst)" >
                    <eq name="mod" value="1">
                        <div class="mui-slider-item mui-slider-item-duplicate">
                            <a href="{$vofirst.url|default=''}">
                                <img src="<?php echo cmf_get_image_url($vofirst['imgsrc']);?>">
                            </a>
                        </div>
                    </eq>
                </volist>
            </div>
            <div class="mui-slider-indicator mui-text-right">
                <volist name="carousel" id="vocarousel1" offset="0" length="1">
                    <div class="mui-indicator mui-active"></div>
                </volist>

                <volist name="carousel" id="vocarousel2" offset="1">
                    <div class="mui-indicator"></div>
                </volist>
            </div>
        </div>
        <div style="height: 30px;line-height: 30px;">
            <marquee width="100%" direction="left" scrollamount="7" onmouseover="this.stop()" onmouseout="this.start()">
                <volist name="notice" id="vonotice">
                    <svg class="icon" aria-hidden="true"><use xlink:href="#icon-tongzhi-copy"></use></svg>&nbsp;&nbsp;
                    <a href="{:url('wuye/noticedetail',['id'=>$vonotice.id])}"><label style="color: red;">{$vonotice.desc}</label>&nbsp;&nbsp;<label style="color:#ffaa3e;">发布于:<?php echo date('Y-m-d',$vonotice['time'])?></label></a>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </volist>
            </marquee>
        </div>
        <ul class="mui-table-view mui-grid-view mui-grid-9">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{:url('wuye/notice')}">
                <span class="mui-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-icon"></use></svg></span>
                <div class="mui-media-body">物业通知</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{:url('wuye/wei')}">
                <span class="mui-icon"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-luosidao"></use></svg></span>
                <div class="mui-media-body">装修开锁</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{:url('wuye/pay')}">
                <span class="mui-icon"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-shoufeizhan"></use></svg></span>
                <div class="mui-media-body">在线缴费</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{:url('wuye/express')}">
                <span class="mui-icon"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-songhuo"></use></svg></span>
                <div class="mui-media-body">快递收寄</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{$wzcx.cxbj}">
                <span class="mui-icon"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-chexianbaojia"></use></svg></span>
                <div class="mui-media-body">车险报价</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{:url('wuye/jia')}">
                <span class="mui-icon "> <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jiazhengfuwu1"></use>
                    </svg></span>
                <div class="mui-media-body">家政服务</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{:url('wuye/meituan')}">
                <span class="mui-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-shangchangtubiao-"></use></svg></span>
                <div class="mui-media-body">周边商圈</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="{:url('wuye/lease')}">
                <span class="mui-icon"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-house-add"></use></svg></span>
                <div class="mui-media-body">房屋租售</div></a></li>
        </ul>
    </div>
    <div>
        <div class="mui-card">
            <div class="mui-card-header">秒杀团购</div>
        </div>
        <notempty name="advert">
            <volist name="advert" id="voAdvert">

                    <div class="mui-card">
                        <a href="{$voAdvert.url}">
                        <div class="mui-card-content">
                            <div class="mui-card-content-inner">
                                <p><?php echo date('Y-m-d',$voAdvert['addtime'])?></p>
                                <img src="<?php echo cmf_get_image_url($voAdvert['img']);?>" alt="" width="100%">
                                <p style="color: #333;">{$voAdvert.title}</p>
                            </div>
                        </div>
                        </a>
                        <div class="mui-card-footer">
                            <a href="{$voAdvert.url}" class="mui-card-link"><span style="font-size: 18px;margin-right: 8px;">现价：{$voAdvert.xian}</span><span  style="text-decoration:line-through;color: #333;font-size: 10px;">原价：{$voAdvert.yuan}</span></a>
                            <a href="{$voAdvert.url}" class="mui-card-link">去买</a>
                        </div>

                    </div>

            </volist>
        </notempty>
    </div>
</div>

<div id="picture" class="mui-popover mui-popover-action mui-popover-bottom">
    <ul class="mui-table-view">
        <li class="mui-table-view-cell">
            <a href="#" style="color: #0b0b0b">朋友圈</a>
        </li>
        <li class="mui-table-view-cell">
            <a href="#" style="color: #0b0b0b">跳蚤市场</a>
        </li>
    </ul>
    <ul class="mui-table-view">
        <li class="mui-table-view-cell">
            <a href="#picture"><b>取消</b></a>
        </li>
    </ul>
</div>
</body>
<script src="__TMPL__/public/assets/wuye/js/mui.min.js"></script>
<script src="__TMPL__/public/assets/wuye/js/iconfont.js"></script>
<script src="__TMPL__/public/assets/wuye/js/mui.picker.js"></script>
<script src="__TMPL__/public/assets/wuye/js/mui.poppicker.js"></script>
<script>
    mui.init({
        swipeBack:true //启用右滑关闭功能
    });
    var gallery = mui('.mui-slider');
    gallery.slider({
        interval:3000//自动轮播周期，若为0则不自动播放，默认为0；
    });
    var info = document.getElementById("info");
    mui('body').on('tap', '.mui-popover-action li>a', function() {
        var a = this,
            parent;
        //根据点击按钮，反推当前是哪个actionsheet
        for (parent = a.parentNode; parent != document.body; parent = parent.parentNode) {
            if (parent.classList.contains('mui-popover-action')) {
                break;
            }
        }
        //关闭actionsheet
        mui('#' + parent.id).popover('toggle');
        if(a.innerHTML == '朋友圈'){
            console.log(a.innerHTML);
            window.location.href = "{:url('wuye/friends')}";
        }else if(a.innerHTML == '跳蚤市场'){
            window.location.href = "{:url('wuye/market')}";
        }

    })
    mui('body').on('tap','a',function(){document.location.href=this.href;});
</script>
</html>